const db = require("../../lib/db");

//获取标签
exports.getLabel = () => {
    let _sql = `SELECT * FROM label`;
    return db.queryWithPool(_sql);
  }
  
  //新建标签
  exports.addLabel = (value) => {
    let _sql = `INSERT INTO label set ?`;
    return db.queryWithPool(_sql, value);
  }
  
  //删除标签
  exports.deleteLabel = (id) => {
    let _sql = `DELETE FROM label WHERE id = ?`;
    return db.queryWithPool(_sql, [id]);
  }